<!-- Dropdown {{ dropdown.name }} -->
{% if item.active == 1 %}
    <div class="hidden variable-config" data-id="{% if form %}{{ form.web_id }}-{% endif %}{{ item.web_id }}-{{ uuid }}" data-name="{{ item.name }}" data-key="{{ item.key }}" data-init-type="0" data-type="{{ item.item_type}}" data-min="{{ item.min }}" data-max="{{ item.max }}" data-value-class="{{ item.value_class }}"  data-min-type="{{ item.min_type }}" data-max-type="{{ item.max_type }}"></div>
    <div class="input-group set_value">
        <span class="input-group-addon input-group-addon-label" style="width:40%;height:34px;">{{ item.label }}</span>
        <span class="input-group-addon input-group-addon-label" style="{% if item.unit and not form %}width:40%;{% elif item.unit or not form %}width: 50%;{% else %}width:60%;{% endif %}padding:0;border:0;">
            <select class="form-control select {{ item.web_class_str }}" id="{% if form %}{{ form.web_id }}-{% endif %}{{ item.web_id }}-{{ uuid }}-value" data-key="{{ item.key }}" data-type="{{ item.item_type }}" data-name="{{ item.name }}">
                {% if item.control_element_options.empty_dropdown_value == 1 %}
                    <option disabled selected value> {{ item.control_element_options.placeholder }} </option>
                {% endif %}
                {% for dict_item in item.dictionary.dictionaryitem_set.all %}
                    <option {% if item.control_element_options.empty_dropdown_value == 0 and last_value|floatformat:5 == dict_item.value|floatformat:5 %} selected {% endif %} class="select-item {{ item.web_class_str }}" id="{{ dict_item.pk }}" data-value="{{ dict_item.value }}" value="{{ dict_item.value }}">{{ dict_item.label }}</option>
                {% endfor %}
                </select>
            </span>
        {% if item.unit %}
            <span class="input-group-addon" style="width: 10%;display: inline-block;height: 34px;">{{ item.unit }}</span>
        {% endif %}
        {% if not form %}
            <span class="input-group-btn" style="display:inline-block;width:10%;">
                <button class="btn btn-default write-task-set {{ item.web_class_str }}" data-key="{{ item.key }}" data-type="{{ item.item_type}}" id="{{ item.web_id }}-{{ uuid }}" type="button" style="width:100%;height:34px;padding-top:0;padding-bottom:0;">set</button>
            </span>
        {% endif %}
    </div>
{% endif %}